package com.dries.portal.module.user.service;

import com.dries.portal.module.user.entity.UserEntity;
import io.netty.channel.Channel;

import java.util.Map;
import java.util.Set;

/**
 * @Description: 会员信息缓存业务类
 * @Author ZSY
 * @createTime 2020/6/29 9:12
 */
public interface UserCacheService {

    /**
     * 删除会员用户缓存
     */
    void delUser(Long userId);

    /**
     * 获取会员用户缓存
     */
    UserEntity getUser(String username);
    UserEntity getUserByOpenId(String openId);

    /**
     * 设置会员用户缓存
     */
    void setUser(UserEntity user);
    void setUserByOpenId(UserEntity user);

    /**
     * 设置验证码
     */
    void setAuthCode(String telephone, String authCode);

    /**
     * 获取验证码
     */
    String getAuthCode(String telephone);

    void setUserChannelRel(String sendUserId, Map<String, Channel> manager);

    Channel getUserChannelRel(String sendUserId);

    /**
     * 设置优惠券
     */
    void setCouponCode(Integer id, Set<String> couponCodes);

}
